CREATE TABLE [dbo].[TTDIST_GAST]
(
[CO_DIST_GAST] [dbo].[TD_VC_003] NOT NULL,
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_TIPO_GAST] [dbo].[TD_VC_003] NOT NULL,
[CO_RUBR_GAST] [dbo].[TD_VC_003] NOT NULL,
[CO_SUBR_GAST] [dbo].[TD_VC_003] NOT NULL,
[DE_DIST_GAST] [dbo].[TD_VC_100] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTDIST_GA__CO_US__263B8EAF] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTDIST_GA__FE_US__272FB2E8] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTDIST_GA__CO_US__2823D721] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTDIST_GA__FE_US__2917FB5A] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTDIST_GAST] ADD CONSTRAINT [PK__TTDIST_G__6E28A121208DA251] PRIMARY KEY CLUSTERED  ([CO_DIST_GAST], [CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST], [CO_SUBR_GAST]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTDIST_GAST] ADD CONSTRAINT [FK__TTDIST_GAST__527A03A0] FOREIGN KEY ([CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST], [CO_SUBR_GAST]) REFERENCES [dbo].[TTSUBR_GAST] ([CO_EMPR], [CO_TIPO_GAST], [CO_RUBR_GAST], [CO_SUBR_GAST])
GO
